<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="en" />
	<meta name="GENERATOR" content="PHPEclipse 1.2.0" />
	<title>title</title>
</head>
<body>

<?php
include '../global.php';
include REPOMATH_ROOT . '/model/User.class.php';

if (!empty ($_POST['submit']) && $_POST['submit'] == "SUBMIT"):
	$user = new User();
	$row = $user->Login($_POST['uname'], $_POST['pword']);
	if ($row != false) {
		echo ("Welcome Back. " . $row["Us_first_name"] . " " . $row["Us_last_name"] . " the " . $row["Ro_descr"]);
		echo ("Read priority from session: " . $_SESSION["user"]["Ro_pri"]);
	} else {
		echo ("User Name or Password is wrong. Please Try again.");
	}
else:
?>

<form action="Login.html.php" method = "post">
	UserName:<input type="text" name="uname" size = "20" maxlength="40"/></br>
	PassWord:<input type="text" name="pword" size = "20" maxlength="40"/></br>
	<input type="submit" name="submit" value="SUBMIT" />
</form>

<?php 
endif 
?>

<a href="index.php">BACK</a>
</body>
</html>